package com.sec.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 追加salt
 * Created by Administrator on 2017/12/5.
 */
public class MyUser extends User {

    private Long admin; // salt
    public Long getAdmin() {
        return admin;
    }
    public void setAdmin(Long admin) {
        this.admin = admin;
    }
    public MyUser(String username, String password, boolean enabled,
                  boolean accountNonExpired, boolean credentialsNonExpired,
                  boolean accountNonLocked,
                  Collection<? extends GrantedAuthority> authorities, Long admin) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired,
                accountNonLocked, authorities);
        this.admin=admin;
    }
}
